package com.itheima.weirpc.config;

import cn.hutool.core.io.FastByteArrayOutputStream;
import com.itheima.weirpc.fault.retry.RetryStrategyKeys;
import com.itheima.weirpc.fault.tolerant.TolerantStrategyKeys;
import com.itheima.weirpc.loadbalancer.LoadBalancerKeys;
import com.itheima.weirpc.serializer.SerializerKeys;
import lombok.Data;

/**
 * ClassName: RpcConfig
 * Package: com.itheima.weirpc.config
 * Description:
 *
 * @Author 看到风
 * @Create 2024/11/23 18:17
 * @Version 1.0
 */
@Data
public class RpcConfig {

    /*
    模拟调用
     */
    private boolean mock = false;

    /**
     * 名称
     */
    private String name = "wei-rpc";

    /**
     * 版本号
     */
    private String version = "1.0";

    /**
     * 服务器主机名
     */
    private String serverHost = "localhost";

    /**
     * 服务器端口号
     */
    private Integer serverPort = 8080;

    /**
     * 序列化器
     */
    private String serializer = SerializerKeys.JDK;
//
//    /**
//     * 模拟调用
//     */
//    private boolean mock = false;
//
    /**
     * 注册中心配置
     */
    private RegistryConfig registryConfig = new RegistryConfig();

    /*
    负载均衡器
     */
    private String loadBalancer = LoadBalancerKeys.ROUND_ROBIN;

    /*
    重试策略
     */
    private String retryStrategy = RetryStrategyKeys.NO;

    /**
     * 容错celve
     */
    private String tolerantStrategy = TolerantStrategyKeys.FAIL_FAST;
}
